home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 September / PCWorld_2008-09_cd.bin / v cisle / sadanastroju / lightning-0.8-tb-win.xpi / chrome / calendar.jar / content / calendar / sun-calendar-event-dialog-recurrence.xul < prev    next >
Extensible Markup Language  |  2008-01-13  |  27KB  |  526 lines

  1. <?xml version="1.0"?>
  2. <!-- ***** BEGIN LICENSE BLOCK *****
  3.    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.    -
  5.    - The contents of this file are subject to the Mozilla Public License Version
  6.    - 1.1 (the "License"); you may not use this file except in compliance with
  7.    - the License. You may obtain a copy of the License at
  8.    - http://www.mozilla.org/MPL/
  9.    -
  10.    - Software distributed under the License is distributed on an "AS IS" basis,
  11.    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.    - for the specific language governing rights and limitations under the
  13.    - License.
  14.    -
  15.    - The Original Code is Sun Microsystems code.
  16.    -
  17.    - The Initial Developer of the Original Code is Sun Microsystems.
  18.    - Portions created by the Initial Developer are Copyright (C) 2006
  19.    - the Initial Developer. All Rights Reserved.
  20.    -
  21.    - Contributor(s):
  22.    -   Michael Buettner <michael.buettner@sun.com>
  23.    -
  24.    - Alternatively, the contents of this file may be used under the terms of
  25.    - either the GNU General Public License Version 2 or later (the "GPL"), or
  26.    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.    - in which case the provisions of the GPL or the LGPL are applicable instead
  28.    - of those above. If you wish to allow use of your version of this file only
  29.    - under the terms of either the GPL or the LGPL, and not to allow others to
  30.    - use your version of this file under the terms of the MPL, indicate your
  31.    - decision by deleting the provisions above and replace them with the notice
  32.    - and other provisions required by the GPL or the LGPL. If you do not delete
  33.    - the provisions above, a recipient may use your version of this file under
  34.    - the terms of any one of the MPL, the GPL or the LGPL.
  35.    -
  36.    - ***** END LICENSE BLOCK ***** -->
  37.  
  38. <?xml-stylesheet type="text/css" href="chrome://global/skin/global.css"?>
  39. <?xml-stylesheet type="text/css" href="chrome://calendar/skin/sun-calendar-event-dialog.css"?>
  40. <?xml-stylesheet type="text/css" href="chrome://calendar/content/sun-calendar-event-dialog.css"?>
  41. <?xml-stylesheet type="text/css" href="chrome://calendar/content/datetimepickers/datetimepickers.css"?>
  42.  
  43. <!DOCTYPE dialog [
  44.   <!ENTITY % globalDTD SYSTEM "chrome://calendar/locale/global.dtd">
  45.   <!ENTITY % sunDialogDTD SYSTEM "chrome://calendar/locale/sun-calendar-event-dialog.dtd">
  46.   <!ENTITY % recurrenceDTD SYSTEM "chrome://calendar/locale/calendar-recurrence-dialog.dtd">
  47.   <!ENTITY % dialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd">
  48.   %globalDTD;
  49.   %sunDialogDTD;
  50.   %recurrenceDTD;
  51.   %dialogDTD;
  52. ]>
  53.  
  54. <dialog id="sun-calendar-event-dialog-recurrence"
  55.         title="&recurrence.title.label;"
  56.         onload="onLoad()"
  57.         ondialogaccept="return onAccept();"
  58.         ondialogcancel="return true;"
  59.         persist="screenX screenY"
  60.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  61.  
  62.   <!-- Javascript includes -->
  63.   <script type="application/x-javascript" src="chrome://calendar/content/sun-calendar-event-dialog-recurrence.js"/>
  64.   <script type="application/x-javascript" src="chrome://calendar/content/calendar-dialog-utils.js"/>
  65.   <script type="application/x-javascript" src="chrome://calendar/content/calendar-ui-utils.js"/>
  66.   <script type="application/x-javascript" src="chrome://calendar/content/calUtils.js"/>
  67.  
  68.   <!-- recurrence pattern -->
  69.   <groupbox id="recurrence-pattern-groupbox">
  70.     <caption id="recurrence-pattern-caption"
  71.              label="&event.recurrence.pattern.label;"/>
  72.     <grid id="recurrence-pattern-grid">
  73.       <columns id="recurrence-pattern-columns">
  74.         <column id="recurrence-pattern-description-column"/>
  75.         <column id="recurrence-pattern-controls-column"/>
  76.       </columns>
  77.       <rows id="recurrence-pattern-rows">
  78.         <row id="recurrence-pattern-repeat-row" align="center">
  79.           <label value="&event.recurrence.occurs.label;"
  80.                  disable-on-readonly="true"
  81.                  disable-on-occurrence="true"
  82.                  control="period-list"/>
  83.           <menulist id="period-list"
  84.                     oncommand="updateRecurrenceDeck();"
  85.                     disable-on-readonly="true"
  86.                     disable-on-occurrence="true">
  87.             <menupopup id="period-list-menupopup">
  88.               <menuitem id="period-list-day-menuitem"
  89.                         label="&event.recurrence.day.label;"
  90.                         value="0"/>
  91.               <menuitem id="period-list-week-menuitem"
  92.                         label="&event.recurrence.week.label;"
  93.                         value="1"/>
  94.               <menuitem id="period-list-month-menuitem"
  95.                         label="&event.recurrence.month.label;"
  96.                         value="2"/>
  97.               <menuitem id="period-list-year-menuitem"
  98.                         label="&event.recurrence.year.label;"
  99.                         value="3"/>
  100.             </menupopup>
  101.           </menulist>
  102.         </row>
  103.         <row id="recurrence-pattern-period-row" align="top">
  104.           <spacer/>
  105.           <deck id="period-deck">
  106.  
  107.             <!-- Daily -->
  108.             <box id="period-deck-daily-box"
  109.                  orient="vertical"
  110.                  align="top">
  111.               <radiogroup id="daily-group"
  112.                           oncommand="updateRecurrenceControls();">
  113.                 <box id="daily-period-every-box" orient="horizontal" align="center">
  114.                   <radio id="daily-group-every-radio"
  115.                          label="&event.recurrence.pattern.every.label;"
  116.                          disable-on-readonly="true"
  117.                          disable-on-occurrence="true"
  118.                          selected="true"/>
  119.                   <textbox id="daily-days" value="1"
  120.                            size="3"
  121.                            oninput="validateIntegerRange(event, 1, 0x7FFF); updateRecurrenceControls();"
  122.                            disable-on-readonly="true"
  123.                            disable-on-occurrence="true"/>
  124.                   <label id="daily-group-every-units-label"
  125.                          value="&repeat.units.days;"
  126.                          disable-on-readonly="true"
  127.                          disable-on-occurrence="true"/>
  128.                   <spacer id="daily-group-spacer" flex="1"/>
  129.                 </box>
  130.                 <radio id="daily-group-weekday-radio"
  131.                        label="&event.recurrence.pattern.every.weekday.label;"
  132.                        disable-on-readonly="true"
  133.                        disable-on-occurrence="true"/>
  134.               </radiogroup>
  135.             </box>
  136.             <!-- Weekly -->
  137.             <vbox id="period-deck-weekly-box">
  138.               <hbox id="weekly-period-every-box" align="center">
  139.                 <label id="weekly-period-every-label"
  140.                        value="&event.recurrence.pattern.every.label;"
  141.                        disable-on-readonly="true"
  142.                        disable-on-occurrence="true"
  143.                        control="weekly-weeks"/>
  144.                 <textbox id="weekly-weeks"
  145.                          value="1"
  146.                          size="3"
  147.                          oninput="validateIntegerRange(event, 1, 0x7FFF); updateRecurrenceControls();"
  148.                          disable-on-readonly="true"
  149.                          disable-on-occurrence="true"/>
  150.                 <label id="weekly-period-units-label"
  151.                        value="&repeat.units.weeks.both;"
  152.                        disable-on-readonly="true"
  153.                        disable-on-occurrence="true"/>
  154.               </hbox>
  155.               <hbox>
  156.                 <label id="weekly-period-on-label"
  157.                        value="&event.recurrence.on.label;"
  158.                        disable-on-readonly="true"
  159.                        disable-on-occurrence="true"
  160.                        control="daypicker-weekday"/>
  161.                 <daypicker-weekday id="daypicker-weekday"
  162.                                    flex="1"
  163.                                    disable-on-readonly="true"
  164.                                    disable-on-occurrence="true"
  165.                                    onselect="updateRecurrenceControls();"/>
  166.               </hbox>
  167.             </vbox>
  168.  
  169.             <!-- Monthly -->
  170.             <vbox id="period-deck-monthly-box">
  171.               <hbox id="montly-period-every-box" align="center">
  172.                 <label id="monthly-period-every-label"
  173.                        value="&event.recurrence.pattern.every.label;"
  174.                        disable-on-readonly="true"
  175.                        disable-on-occurrence="true"
  176.                        control="monthly-interval"/>
  177.                 <textbox id="monthly-interval"
  178.                          value="1"
  179.                          size="3"
  180.                          oninput="validateIntegerRange(event, 1, 0x7FFF); updateRecurrenceControls();"
  181.                          disable-on-readonly="true"
  182.                          disable-on-occurrence="true"/>
  183.                 <label id="monthly-period-units-label"
  184.                        value="&repeat.units.months.both;"
  185.                        disable-on-readonly="true"
  186.                        disable-on-occurrence="true"/>
  187.               </hbox>
  188.               <radiogroup id="monthly-group"
  189.                           oncommand="updateRecurrenceControls();">
  190.                 <box id="monthly-period-relative-date-box"
  191.                          orient="horizontal" align="center">
  192.                   <radio id="montly-period-relative-date-radio"
  193.                          label="&event.recurrence.the.label;"
  194.                          selected="true"
  195.                          disable-on-readonly="true"
  196.                          disable-on-occurrence="true"/>
  197.                   <menulist id="monthly-ordinal"
  198.                             disable-on-readonly="true"
  199.                             disable-on-occurrence="true">
  200.                     <menupopup id="montly-ordinal-menupopup">
  201.                       <menuitem id="monthly-ordinal-first-label"
  202.                                 label="&event.recurrence.repeat.first.label;"
  203.                                 value="1"/>
  204.                       <menuitem id="mnthly-ordinal-second-label"
  205.                                 label="&event.recurrence.repeat.second.label;"
  206.                                 value="2"/>
  207.                       <menuitem id="monthly-ordinal-third-label"
  208.                                 label="&event.recurrence.repeat.third.label;"
  209.                                 value="3"/>
  210.                       <menuitem id="monthly-ordinal-fourth-label"
  211.                                 label="&event.recurrence.repeat.fourth.label;"
  212.                                 value="4"/>
  213.                       <menuitem id="monthly-ordinal-fifth-label"
  214.                                 label="&event.recurrence.repeat.fifth.label;"
  215.                                 value="5"/>
  216.                       <menuitem id="monthly-ordinal-last-label"
  217.                                 label="&event.recurrence.repeat.last.label;"
  218.                                 value="-1"/>
  219.                     </menupopup>
  220.                   </menulist>
  221.                   <menulist id="monthly-weekday"
  222.                             disable-on-readonly="true"
  223.                             disable-on-occurrence="true">
  224.                     <menupopup id="monthly-weekday-menupopup">
  225.                       <menuitem id="monthly-weekday-1"
  226.                                 label="&day.1.name;"
  227.                                 value="1"/>
  228.                       <menuitem id="monthly-weekday-2"
  229.                                 label="&day.2.name;"
  230.                                 value="2"/>
  231.                       <menuitem id="monthly-weekday-3"
  232.                                 label="&day.3.name;"
  233.                                 value="3"/>
  234.                       <menuitem id="monthly-weekday-4"
  235.                                 label="&day.4.name;"
  236.                                 value="4"/>
  237.                       <menuitem id="monthly-weekday-5"
  238.                                 label="&day.5.name;"
  239.                                 value="5"/>
  240.                       <menuitem id="monthly-weekday-6"
  241.                                 label="&day.6.name;"
  242.                                 value="6"/>
  243.                       <menuitem id="monthly-weekday-7"
  244.                                 label="&day.7.name;"
  245.                                 value="7"/>
  246.                       <menuitem id="monthly-weekday-dayofmonth"
  247.                                 label="&event.recurrence.repeat.dayofmonth.label;"
  248.                                 value="-1"/>
  249.                     </menupopup>
  250.                   </menulist>
  251.                 </box>
  252.                 <box id="monthly-period-specific-date-box"
  253.                      orient="horizontal"
  254.                      align="center">
  255.                   <radio id="montly-period-specific-date-radio"
  256.                          label="&event.recurrence.repeat.recur.label;"
  257.                          disable-on-readonly="true"
  258.                          disable-on-occurrence="true"/>
  259.                   <daypicker-monthday id="monthly-days"
  260.                                       onselect="updateRecurrenceControls();"
  261.                                       disable-on-readonly="true"
  262.                                       disable-on-occurrence="true"/>
  263.                 </box>
  264.               </radiogroup>
  265.             </vbox>
  266.  
  267.             <!-- Yearly -->
  268.             <box id="period-deck-yearly-box"
  269.                  orient="vertical"
  270.                  align="top">
  271.               <hbox id="yearly-period-every-box" align="center">
  272.                 <label id="yearly-period-every-label"
  273.                        value="&event.recurrence.every.label;"
  274.                        control="yearly-interval"/>
  275.                 <textbox id="yearly-interval"
  276.                          value="1"
  277.                          size="3"
  278.                          oninput="validateIntegerRange(event, 1, 0x7FFF); updateRecurrenceControls();"
  279.                          disable-on-readonly="true"
  280.                          disable-on-occurrence="true"/>
  281.                 <label id="yearly-period-units-label" value="&repeat.units.years.both;"/>
  282.               </hbox>
  283.               <radiogroup id="yearly-group"
  284.                           oncommand="updateRecurrenceControls();">
  285.                 <grid id="yearly-period-grid">
  286.                   <columns id="yearly-period-columns">
  287.                     <column id="yearly-period-radio-column"/>
  288.                     <column id="yearly-period-controls-column"/>
  289.                   </columns>
  290.                   <rows id="yearly-period-rows">
  291.                     <row id="yearly-period-absolute-row" align="center">
  292.                       <radio id="yearly-period-absolute-radio"
  293.                              label="&event.recurrence.pattern.every.label;"
  294.                              selected="true"
  295.                              disable-on-readonly="true"
  296.                              disable-on-occurrence="true"/>
  297.                       <box id="yearly-period-absolute-controls"
  298.                            orient="horizontal"
  299.                            align="center">
  300.                         <textbox id="yearly-days"
  301.                                  value="1"
  302.                                  size="3"
  303.                                  oninput="updateRecurrenceControls();"
  304.                                  disable-on-readonly="true"
  305.                                  disable-on-occurrence="true"/>
  306.                         <menulist id="yearly-month-ordinal"
  307.                                   disable-on-readonly="true"
  308.                                   disable-on-occurrence="true">
  309.                           <menupopup id="yearly-month-ordinal-menupopup">
  310.                             <menuitem id="yearly-month-ordinal-1"
  311.                                       label="&month.1.name;"
  312.                                       value="1"/>
  313.                             <menuitem id="yearly-month-ordinal-2"
  314.                                       label="&month.2.name;"
  315.                                       value="2"/>
  316.                             <menuitem id="yearly-month-ordinal-3"
  317.                                       label="&month.3.name;"
  318.                                       value="3"/>
  319.                             <menuitem id="yearly-month-ordinal-4"
  320.                                       label="&month.4.name;"
  321.                                       value="4"/>
  322.                             <menuitem id="yearly-month-ordinal-5"
  323.                                       label="&month.5.name;"
  324.                                       value="5"/>
  325.                             <menuitem id="yearly-month-ordinal-6"
  326.                                       label="&month.6.name;"
  327.                                       value="6"/>
  328.                             <menuitem id="yearly-month-ordinal-7"
  329.                                       label="&month.7.name;"
  330.                                       value="7"/>
  331.                             <menuitem id="yearly-month-ordinal-8"
  332.                                       label="&month.8.name;"
  333.                                       value="8"/>
  334.                             <menuitem id="yearly-month-ordinal-9"
  335.                                       label="&month.9.name;"
  336.                                       value="9"/>
  337.                             <menuitem id="yearly-month-ordinal-10"
  338.                                       label="&month.10.name;"
  339.                                       value="10"/>
  340.                             <menuitem id="yearly-month-ordinal-11"
  341.                                       label="&month.11.name;"
  342.                                       value="11"/>
  343.                             <menuitem id="yearly-month-ordinal-12"
  344.                                       label="&month.12.name;"
  345.                                       value="12"/>
  346.                           </menupopup>
  347.                         </menulist>
  348.                       </box>
  349.                     </row>
  350.                     <row id="yearly-period-relative-row" align="center">
  351.                       <radio id="yearly-period-relative-radio"
  352.                              label="&event.recurrence.pattern.every.label;"
  353.                              disable-on-readonly="true"
  354.                              disable-on-occurrence="true"/>
  355.                       <box id="yearly-period-relative-controls"
  356.                            orient="horizontal"
  357.                            align="center">
  358.                         <menulist id="yearly-ordinal"
  359.                                   disable-on-readonly="true"
  360.                                   disable-on-occurrence="true">
  361.                           <menupopup id="yearly-ordinal-menupopup">
  362.                             <menuitem id="yearly-ordinal-first"
  363.                                       label="&event.recurrence.repeat.first.label;"
  364.                                       value="1"/>
  365.                             <menuitem id="yearly-ordinal-second"
  366.                                       label="&event.recurrence.repeat.second.label;"
  367.                                       value="2"/>
  368.                             <menuitem id="yearly-ordinal-third"
  369.                                       label="&event.recurrence.repeat.third.label;"
  370.                                       value="3"/>
  371.                             <menuitem id="yearly-ordinal-fourth"
  372.                                       label="&event.recurrence.repeat.fourth.label;"
  373.                                       value="4"/>
  374.                             <menuitem id="yearly-ordinal-fifth"
  375.                                       label="&event.recurrence.repeat.fifth.label;"
  376.                                       value="5"/>
  377.                             <menuitem id="yearly-ordinal-last"
  378.                                       label="&event.recurrence.repeat.last.label;"
  379.                                       value="-1"/>
  380.                           </menupopup>
  381.                         </menulist>
  382.                         <menulist id="yearly-weekday"
  383.                                   disable-on-readonly="true"
  384.                                   disable-on-occurrence="true">
  385.                           <menupopup id="yearly-weekday-menupopup">
  386.                             <menuitem id="yearly-weekday-1"
  387.                                       label="&day.1.name;"
  388.                                       value="1"/>
  389.                             <menuitem id="yearly-weekday-2"
  390.                                       label="&day.2.name;"
  391.                                       value="2"/>
  392.                             <menuitem id="yearly-weekday-3"
  393.                                       label="&day.3.name;"
  394.                                       value="3"/>
  395.                             <menuitem id="yearly-weekday-4"
  396.                                       label="&day.4.name;"
  397.                                       value="4"/>
  398.                             <menuitem id="yearly-weekday-5"
  399.                                       label="&day.5.name;"
  400.                                       value="5"/>
  401.                             <menuitem id="yearly-weekday-6"
  402.                                       label="&day.6.name;"
  403.                                       value="6"/>
  404.                             <menuitem id="yearly-weekday-7"
  405.                                       label="&day.7.name;"
  406.                                       value="7"/>
  407.                           </menupopup>
  408.                         </menulist>
  409.                       </box>
  410.                     </row>
  411.                     <row id="yearly-period-monthname-row" align="center">
  412.                       <label id="yearly-period-of-label"
  413.                              value="&event.recurrence.of.label;"
  414.                              style="text-align: right" control="yearly-month-rule"/>
  415.                       <menulist id="yearly-month-rule"
  416.                                 disable-on-readonly="true"
  417.                                 disable-on-occurrence="true">
  418.                         <menupopup id="yearly-month-rule-menupopup">
  419.                           <menuitem id="yearly-month-rule-1"
  420.                                     label="&month.1.name;"
  421.                                     value="1"/>
  422.                           <menuitem id="yearly-month-rule-2"
  423.                                     label="&month.2.name;"
  424.                                     value="2"/>
  425.                           <menuitem id="yearly-month-rule-3"
  426.                                     label="&month.3.name;"
  427.                                     value="3"/>
  428.                           <menuitem id="yearly-month-rule-4"
  429.                                     label="&month.4.name;"
  430.                                     value="4"/>
  431.                           <menuitem id="yearly-month-rule-5"
  432.                                     label="&month.5.name;"
  433.                                     value="5"/>
  434.                           <menuitem id="yearly-month-rule-6"
  435.                                     label="&month.6.name;"
  436.                                     value="6"/>
  437.                           <menuitem id="yearly-month-rule-7"
  438.                                     label="&month.7.name;"
  439.                                     value="7"/>
  440.                           <menuitem id="yearly-month-rule-8"
  441.                                     label="&month.8.name;"
  442.                                     value="8"/>
  443.                           <menuitem id="yearly-month-rule-9"
  444.                                     label="&month.9.name;"
  445.                                     value="9"/>
  446.                           <menuitem id="yearly-month-rule-10"
  447.                                     label="&month.10.name;"
  448.                                     value="10"/>
  449.                           <menuitem id="yearly-month-rule-11"
  450.                                     label="&month.11.name;"
  451.                                     value="11"/>
  452.                           <menuitem id="yearly-month-rule-12"
  453.                                     label="&month.12.name;"
  454.                                     value="12"/>
  455.                         </menupopup>
  456.                       </menulist>
  457.                     </row>
  458.                   </rows>
  459.                 </grid>
  460.               </radiogroup>
  461.             </box>
  462.           </deck>
  463.         </row>
  464.       </rows>
  465.     </grid>
  466.   </groupbox>
  467.  
  468.   <!-- range of recurrence -->
  469.   <groupbox id="recurrence-range-groupbox">
  470.     <caption id="recurrence-range-caption"
  471.              label="&event.recurrence.range.label;"/>
  472.     <vbox>
  473.       <radiogroup id="recurrence-duration"
  474.                   oncommand="updateRecurrenceControls()">
  475.         <radio id="recurrence-range-forever"
  476.                label="&event.recurrence.forever.label;"
  477.                value="forever"
  478.                selected="true"
  479.                disable-on-readonly="true"
  480.                disable-on-occurrence="true"/>
  481.         <box id="recurrence-range-count-box"
  482.              orient="horizontal"
  483.              align="center">
  484.           <radio id="recurrence-range-for"
  485.                  label="&event.recurrence.repeat.for.label;"
  486.                  value="ntimes"
  487.                  disable-on-readonly="true"
  488.                  disable-on-occurrence="true"/>
  489.           <textbox id="repeat-ntimes-count"
  490.                    size="3"
  491.                    value="5"
  492.                    oninput="validateIntegerRange(event, 1, 0x7FFF); updateRecurrenceControls();"
  493.                    disable-on-readonly="true"
  494.                    disable-on-occurrence="true"/>
  495.           <label id="repeat-appointments-label"
  496.                  value="&event.recurrence.appointments.label;"
  497.                  disable-on-readonly="true"
  498.                  disable-on-occurrence="true"/>
  499.         </box>
  500.         <box id="recurrence-range-until-box"
  501.              orient="horizontal"
  502.              align="center">
  503.           <radio id="recurrence-range-until"
  504.                  label="&event.repeat.until.label;"
  505.                  value="until"
  506.                  disable-on-readonly="true"
  507.                  disable-on-occurrence="true"
  508.                  control="repeat-until-date"/>
  509.           <datepicker id="repeat-until-date"
  510.                       onchange="updateRecurrenceControls();"
  511.                       disable-on-readonly="true"
  512.                       disable-on-occurrence="true"/>
  513.         </box>
  514.       </radiogroup>
  515.     </vbox>
  516.   </groupbox>
  517.  
  518.   <!-- preview -->
  519.   <vbox id="recurrence-preview-box" flex="1">
  520.     <label id="recurrence-preview-label"
  521.            value="&event.recurrence.preview.label;"
  522.            control="recurrence-preview"/>
  523.     <recurrence-preview id="recurrence-preview" flex="1"/>
  524.   </vbox>
  525. </dialog>
  526.